class Replica < ActiveRecord::Base
  belongs_to :audio_asset
  belongs_to :replica_system
  has_many   :fetchers, :dependent => :destroy
  
  def available?
    self.available
  end
  
  def self.new_to_replicate
    Replica.new do |replica|
      replica.file_type = AudioAsset::EssenceFileType
      replica.main = false
      replica.available = false
    end
  end
  
  def self.new_to_replicate_metadata
    Replica.new do |replica|
      replica.file_type = AudioAsset::MetadataFileType
      replica.main = false
      replica.available = false
    end
  end
end
